<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title>自定义提示框</title>
    <style>
        .modal-content {
            background-color: #fefefe;
            margin: 5% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
        }
        .button {
            border: 2px solid green;
            padding: 10px;
            margin: 10px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="modal-content">
        <h2>请输入你的信息</h2>
        <label for="name">名字:</label>
        <input type="text" id="name" name="name"><br><br>
        <label for="age">年龄:</label>
        <input type="text" id="age" name="age"><br><br>
        <button class="button" onclick="submitData()">提交</button>
    </div>
    <script>
        function submitData() {
            var name = document.getElementById('name').value;
            var age = document.getElementById('age').value;
            if (name && age) {
                alert('你好，' + name + '。你' + age + '岁了。');
            } else {
                alert('请输入完整的信息');
            }
        }
    </script>
</body>
</html>
